"""报数"""


class Solution:
    def countAndSay(self, n):
        if n == 1:
            print("1")
            return "1"
        str1 = "1"
        for i in range(2, n + 1):
            str2 = ""
            ptr = 0
            s = str1[0]
            for j in range(len(str1)):
                if s == str1[j]:
                    ptr += 1
                else:
                    str2 += str(ptr) + str1[j - 1]
                    ptr, s = 1, str1[j]
                if j == len(str1) - 1:
                    str2 += str(ptr) + str1[j]
            str1 = str2
        print(str1)
        return str1


if __name__ == '__main__':
    s = Solution()
    n = int(input())
    s.countAndSay(n)
